package com.ruiysoft.entity.sys;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author huazengguang
 * @since 2018-11-17
 */
@TableName("sys_shop_personnel_relation")
public class SysShopPersonnelRelation extends Model<SysShopPersonnelRelation> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    @TableField("personnel_id")
    private Long personnelId;

    @TableField("shop_id")
    private Long shopId;

//
//    @TableField("identity_type")
//    private Integer identityType;

    @TableField("parent_id")
    private Long parentId;

    @TableField("member_level")
    private Integer memberLevel;

    @TableField("member_flag")
    private Boolean memberFlag;

    @TableField("relation_time")
    private Date relationTime;//关系建立时间

    /**
     * 分销规则ID
     */
    @TableField("distributionId")
    private long distributionId;

    public Long getId() {
        return id;
    }

    public SysShopPersonnelRelation setId(Long id) {
        this.id = id;
        return this;
    }

    public Long getPersonnelId() {
        return personnelId;
    }

    public SysShopPersonnelRelation setPersonnelId(Long personnelId) {
        this.personnelId = personnelId;
        return this;
    }

    public Long getShopId() {
        return shopId;
    }

    public SysShopPersonnelRelation setShopId(Long shopId) {
        this.shopId = shopId;
        return this;
    }

    public Long getParentId() {
        return parentId;
    }

    public SysShopPersonnelRelation setParentId(Long parentId) {
        this.parentId = parentId;
        return this;
    }

    public Date getRelationTime() {
        return relationTime;
    }

    public void setRelationTime(Date relationTime) {
        this.relationTime = relationTime;
    }

    public Integer getMemberLevel() {
        return memberLevel;
    }

    public SysShopPersonnelRelation setMemberLevel(Integer memberLevel) {
        this.memberLevel = memberLevel;
        return this;
    }

    public Boolean getMemberFlag() {
        return memberFlag;
    }

    public SysShopPersonnelRelation setMemberFlag(Boolean memberFlag) {
        this.memberFlag = memberFlag;
        return this;
    }

    public long getDistributionId() {
        return distributionId;
    }

    public void setDistributionId(long distributionId) {
        this.distributionId = distributionId;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysShopPersonnelRelation{" +
        "id=" + id +
        ", personnelId=" + personnelId +
        ", shopId=" + shopId + ", memberLevel=" + memberLevel +", memberFlag=" + memberFlag +
        "}";
    }
}
